﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.IO;
using System.Configuration;
using Esav.ExceptionManagement;


namespace RelateImageDocALS
{
    public partial class Form1 : Form
    {

        private Thread thdListnerThread;
        private Thread thdListnerThread2;

        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            FTPServiceWHR.FTPCopy OBJ = new FTPServiceWHR.FTPCopy();
            OBJ.CopyFTP();
        }

        private void btnRelacionar_Click(object sender, EventArgs e)
        {
            try
            {
                //Int32 a = 0;
                //Int32 b = 1;
                //Int32 c;
                //c = b / a;

                RelateImageComm objRelImg = new RelateImageComm();
                objRelImg.DocumentRelated();


                RelateImageCommDes objRelImgDes = new RelateImageCommDes();
                objRelImgDes.DocumentRelated();

                //RelateImageMaster objRelImgMas = new RelateImageMaster();
                //objRelImgMas.DocumentRelated();
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }                       

            //this.LoadService();

        }

        private void LoadService()
        {

            RelateImageMaster objProcess2 = new RelateImageMaster();
            thdListnerThread2 = new Thread(new ThreadStart(objProcess2.DocumentRelated));
            thdListnerThread2.Start();
        }

    }
}
